<extend name="Include:Layout"/>
<block name="title">首页</block>
<block name="style">
<style>
.swiper-container {
    width: 100%;
} 

.swiper-container img {
    display: block;
    width: 100%;
	height:180px;
}

</style>
</block>

<block name="main">
	<div class="weui_tab">
		<div class="weui_tab_bd container" id="container">
			<!-- 校区介绍 -->
			<div class="swiper-container" data-space-between='10' data-pagination='.swiper-pagination' data-autoplay="1000">
		      	<div class="swiper-wrapper">
		        	<!-- Slides -->
		        	<volist name="contents" id="vo">
		        	<div class="swiper-slide"><a href="{:U('article',array('id'=>$vo['id']))}"><img src="{$vo.fengmian.url}" /></a></div>
		      		</volist>
		      	</div>
		      	<!-- If we need pagination -->
		      	<div class="swiper-pagination"></div>
		    </div>
			<div class="weui_cells weui_cells_access" style="display:none;">
		        <a class="weui_cell" href="{:U('yuyue')}">
		            <div class="weui_cell_bd weui_cell_primary">
		                <div class="weui_media_hd">	
		            		<h2 style="width:58px;;font-size:18px;line-height:28px;border-right:1px solid #E8E8E8">我 想<br>体 验</h2>
		            	</div>
		            </div>
		            <div class="weui_cell_ft">
		            	预约免费试听
		            </div>
		        </a>
		        
		    </div>
			
		    <div class="weui_grids">
		      <a href="{:U('Single/index',array('key'=>'gywm'))}" class="weui_grid js_grid" data-id="button">
			    <div class="weui_grid_icon">
			       <img src="/Public/Static/Img/avater1.png" alt="">
			    </div>
			    <p class="weui_grid_label">
			     	 关于我们
			    </p>
			  </a>
			  <a href="{:U('Introduce/index')}" class="weui_grid js_grid" data-id="button">
			    <div class="weui_grid_icon">
			       <img src="/Public/Static/Img/avater1.png" alt="">
			    </div>
			    <p class="weui_grid_label">
			     	 校区介绍
			    </p>
			  </a>
			  <a href="{:U('freepay/index')}" class="weui_grid js_grid" data-id="cell">
			  	 <div class="weui_grid_icon">
			      <img src="/Public/Static/Img/avater1.png" alt="">
			    </div>
			    <p class="weui_grid_label">
			      	自定义支付
			    </p>
			  </a>
			  <a href="{:U('news/index')}" class="weui_grid js_grid" data-id="toast">
			    <div class="weui_grid_icon">
			      <img src="/Public/Static/Img/avater1.png" alt="">
			    </div>
			    <p class="weui_grid_label">
			      	新闻动态
			    </p>
			  </a>
			   <a href="{:U('baoming/index',array('t'=>'laosheng'))}" class="weui_grid js_grid" data-id="toast">
			    <div class="weui_grid_icon">
			      <img src="/Public/Static/Img/avater1.png" alt="">
			    </div>
			    <p class="weui_grid_label">
			      	我是老生
			    </p>
			  </a>
			   <a href="{:U('baoming/index')}" class="weui_grid js_grid" data-id="toast">
			    <div class="weui_grid_icon">
			      <img src="/Public/Static/Img/avater1.png" alt="">
			    </div>
			    <p class="weui_grid_label">
			      	我是新生
			    </p>
			  </a>
			   <a href="{:U('yuyue')}" class="weui_grid js_grid" data-id="toast">
			    <div class="weui_grid_icon">
			      <img src="/Public/Static/Img/avater1.png" alt="">
			    </div>
			    <p class="weui_grid_label">
			      	我要体验
			    </p>
			  </a>
			   <a href="{:U('video/index')}" class="weui_grid js_grid" data-id="toast">
			    <div class="weui_grid_icon">
			      <img src="/Public/Static/Img/avater1.png" alt="">
			    </div>
			    <p class="weui_grid_label">
			      	视频播放
			    </p>
			  </a>
			  <a href="{:U('index/qita',array('t'=>'dy'))}" class="weui_grid js_grid" data-id="toast">
			    <div class="weui_grid_icon">
			      <img src="/Public/Static/Img/avater1.png" alt="">
			    </div>
			    <p class="weui_grid_label">
			      	陶艺/DIY
			    </p>
			  </a>
			  <a href="{:U('index/qita',array('t'=>'crb'))}" class="weui_grid js_grid" data-id="toast">
			    <div class="weui_grid_icon">
			      <img src="/Public/Static/Img/avater1.png" alt="">
			    </div>
			    <p class="weui_grid_label">
			      	成人班报名
			    </p>
				</a>
				<a href="{:U('freepay/summer')}" class="weui_grid js_grid" data-id="toast">
			    <div class="weui_grid_icon">
			      <img src="/Public/Static/Img/avater1.png" alt="">
			    </div>
			    <p class="weui_grid_label">
			      	暑期班报名
			    </p>
			  </a>
			</div>
	    </div>
		
		<php>$curbar = 1;</php>
    	<include file="Include:navbar" />
   </div>
<script type="text/html" id="article_list_tuwen">
<a href="/web/index/article/id/{{id}}" class="weui_media_box weui_media_appmsg">
    <div class="weui_media_hd">
        <img class="weui_media_appmsg_thumb" src="{{pic}}" alt="">
    </div>
    <div class="weui_media_bd">
        <h4 class="weui_media_title">{{title}}</h4>
        <p class="weui_media_desc">{{summary}}</p>
    </div>
</a>
</script>
</block>

<block name="script">
<script type='text/javascript' src='/Public/Assets/jqweui/src/js/swiper.jquery.js'></script>
<script>
$(function () {
	//幻灯片
	$(".swiper-container").swiper({
        loop: true,
        autoplay: 3000
    });
	//加载视频列表
	loadvedio();
	//查看视频
	/*
	$('.showvedio').click(function(){
		var $this = $(this);
		$.showLoading("正在加载...");
		$.get('/home/home/get_vedio_test/id/'+$this.attr('data-id'),function(ret){
			$.hideLoading();
			if(ret.status){
				$('#article_detail .weui-popup-modal .content').html('');
				var html = template("tpl_article_vedio",ret.data);
				$('#article_detail .weui-popup-modal .content').html(html);
				$("#article_detail").popup();
			}else{
				$.alert(ret.info);
			}
		});
	});
	*/
   
});
//param里面加入一些参数
function loadvedio(param){
	$.get('/Web/index/get_vedio_test',function(ret){
		if(ret.status){
			var data = ret.data;
			var html = '';
			for(var i = 0 ;i<data.length;i++){
				html += template('article_list_tuwen',data[i]);
			}
			$('#vediolist').html(html);
		}
	});
}
</script>
</block>